<include file="App/Home/View/Public/header.html"/>
	<!--左侧导航 end-->	
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">			
		<div class="row">
			<ol class="breadcrumb">
				<li class="active position_tit">站内短信<span style=" padding:0px 5px;">/</span>收信箱<span style=" padding:0px 5px;">/</span><a href="{:U('Mail/write',array('id'=>$vo['message_id']))}">发送邮件</a></li>
			</ol>
		</div><!--/.row-->
		
		<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">收信箱
					</div>
					<div class="panel-body">
						<form action="{:U('Mail/index')}" method="post" id="myform">
						<table class="table2 table_infor table_bor_bottom">
						    <!--<thead>
						      <tr>
						        <th colspan="3" style=" text-align:center; background-color:#f5f5f5;">*为必填项目</th>
						      </tr>
						    </thead>-->
                            <tbody>
                              <tr>
                                <td class="left1" colspan="3">
                                	<select style="float:left; width:100px; margin:3px 0px 0px 0px;">
                                		<option>发件会员</option>
                                	</select>
                                	<input style="width:270px; float:left; margin:0 10px;" class="form-control" Placeholder="" name="name" value="">
                                	<input style=" width:50px; float:left; margin:2px 0px;" class="yz_btn" type="submit" value="搜索"></td>
                              </tr>
                              <tr>
                                <td class="left1" colspan="3" style=" padding-top:15px;">
                                	<span style=" float:left; width:100px;">搜索时间范围：</span>
                                	<input style="width:140px; height:35px; float:left; margin:0 10px; border:1px solid #A7A7A7;"  type="text" class=" form-control mh_date" readonly name="timeStart"/>
                                	<span style="float:left; padding:0px 5px;">至</span>
                                	<input style="width:140px; height:35px; float:left; margin:0 10px; border:1px solid #A7A7A7;"  type="text" class=" form-control mh_date" readonly name="timeEnd"/>
                                </td>
                            </tr>
                            </tbody>
						</table>
					</form>
                        <table class="table_all">
						    <thead>
						      <tr>
						        <th style=" text-align:center; background-color:#f5f5f5;">收信箱</th>
                                <th style=" text-align:center; background-color:#f5f5f5;">发件会员</th>
                                <th style=" text-align:center; background-color:#f5f5f5;">标题</th>
                                <th style=" text-align:center; background-color:#f5f5f5;">发件时间</th>
                                <th style=" text-align:center; background-color:#f5f5f5;">是否阅读</th>
                                <th style=" text-align:center; background-color:#f5f5f5;">内容</th>
						      </tr>
						    </thead>
                            <tbody>
                            	<foreach name="list" item="vo">
                              <tr>
                                <td><input type="checkbox" name="checkbox" value="{$vo.message_id}"></td>
                                <td>{$vo.username}</td>
                                <td>{$vo.title}</td>
                                <td>{$vo.add_time|date="Y-m-d H:i:s",###}</td>
                                <td><eq name="vo.status" value="1"><span style="color:green;">已查看</span><else/><span style="color:red;">未查看</span></eq></td>
                                <td>
                                	{$vo.content}
                                	<!-- {:U('Index/displaytopics',array('tid'=>$vo['tid']))} -->
									<a href="{:U('Mail/see',array('id'=>$vo['message_id'],'type'=>0))}">点击查看详情</a>
                                </td>

                              </tr>
                          </foreach>
                            </tbody>
						</table>
                        <div class="page" id="Pagination"> 
                          <!--  <a class="current">1</a><a href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#">..88</a><a href="#" class="next">下一页</a> -->
                        	{$Page}
                        </div>
					</div>
                    <div class="panel-footer">
						<div class="input-group article_btn">
							<span class="input-group-btn">
								<!-- <a href="{:U('Mail/del')}"> --><button class="btn btn-success btn-md btn_art_return btn_reset" onclick="del()">删除邮件</button></a>
							</span>
						</div>
                        
					</div>
				</div>
			</div>
		</div><!--/.row-->
        		
	</div>	<!--/.main-->	
<!--时间插件-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/css/manhuaDate.1.0.css">

<script type="text/javascript" src="__PUBLIC__/Home/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/manhuaDate.1.0.js"></script>
<script type="text/javascript">

$(function (){

	$("input.mh_date").manhuaDate({					       
		Event : "click",//可选				       
		Left : 0,//弹出时间停靠的左边位置
		Top : -16,//弹出时间停靠的顶部边位置
		fuhao : "-",//日期连接符默认为-
		isTime : false,//是否开启时间值默认为false
		beginY : 1949,//年份的开始默认为1949
		endY :2100//年份的结束默认为2049
	});
	
});

function del(){
	var obj=document.getElementsByName('checkbox');
	var arr=new Array()
	var a=0;
	for(var i=0; i<obj.length; i++){   
	    if(obj[i].checked){
   			arr[a]=obj[i].value;
	    	a++;
	    }
	}	  
	var url = "{:U('Mail/delete')}";
	$.post(url,{'message_id':arr},function(data){
			//console.log(data['info']);
			alert(data['info']);
		});
	}  
	
	//window.location.href = "{:U('Mail/index')}";
//}


</script>
<!--时间插件end-->
</html>
